<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    session_start();
    if(!isset($_SESSION['usuario'])){
            header('location:../html/login.html');
         }
         
         echo '<center>
             <div id="conte">
                    <table id="cabecera">
                        <tr>
                            <td align="center"> <img id="imagen" src="../imagen/BANNERSIGI.jpg" width="1258" height="125" alt="BANNERSES"/>';
                       echo"</td>
                        </tr>
                        <tr>
                            <td align=right id='sesion'><strong>Sesion:</strong>  ".$_SESSION['nombre']."";
                                echo '<a href="../../controlador/php/sql/cerrarSesion.php"><img src="../imagen/cesesion.png" title="cerrar sesion" width="20" height="20" alt="csesion" align="absbottom"/> </a>
                            </td>
                        </tr>
                        <tr>
                            <td>';
?>
                                <html>
                                    <head>
                                        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
                                        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
                                        <title id="titulo">ReporteS Ginecobstetricia</title>
                                        
                                        <!-- Librerias jquery y hojas de estilo para creacion  del calendario -->
                                        <script src="js/jquery-1.9.1.min.js"></script>
                                        <script src="js/jquery-1.5.2.js" type="text/javascript"></script>
                                        <link rel="stylesheet" href="css/demos.css" type="text/css">
                                        <link rel="stylesheet" href="css/impresion.css" type="text/css" media="print">
                                        <link rel="stylesheet" href="css/jquery.ui.all.css" type="text/css">
                                        <script type="text/javascript" src="js/jquery.ui.core.js"></script>
                                        <script type="text/javascript" src="js/jquery.ui.widget.js"></script>
                                        <script type="text/javascript" src="js/jquery.ui.datepicker.js"></script>
                                        
                                        <link rel="stylesheet" href="css/pestana.css" />
                                        <script src="js/jquery-ui.js"></script>
                                        
                                        
                                        <!-- LIBRERIAS JQUERY Y CSS PARA LA CREACION DE LAS ALERTAS -->
                                        <script type="text/javascript" src="../../Ginecobstetricia/vista/js/alertify.js"></script>
                                        <link rel="stylesheet" href="../../Ginecobstetricia/vista/css/alertify.core.css" />
                                        <link rel="stylesheet" href="../../Ginecobstetricia/vista/css/alertify.default.css" />
                                        
                                        <script>
                                            $(function() {
                                                    $( "#capass2" ).datepicker({ 
                                                     autoSize: true,
                                                     dayNames: ['Domingo', 'Lunes', 'Martes', 'Mi�rcoles', 'Jueves', 'Viernes', 'S�bado'],
                                                     dayNamesMin: ['Dom', 'Lu', 'Ma', 'Mi', 'Je', 'Vi', 'Sa'],
                                                     firstDay: 1,
                                                     monthNames: ['Enero','Febrero','Marzo','Abril','Mayo','Junio','Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre'],
                                                     monthNamesShort: ['Ene','Feb','Mar','Abr','May','Jun','Jul','Ago','Sep','Oct','Nov','Dic'],
                                                     dateFormat: 'dd-mm-yy',
                                                     changeMonth: true,
                                                     changeYear: true,
                                                     yearRange: "-90:+0",


                                                    });
                                            });

                                            $(function() {
                                                    $( "#capass22" ).datepicker({ 
                                                     autoSize: true,
                                                     dayNames: ['Domingo', 'Lunes', 'Martes', 'Mi�rcoles', 'Jueves', 'Viernes', 'S�bado'],
                                                     dayNamesMin: ['Dom', 'Lu', 'Ma', 'Mi', 'Je', 'Vi', 'Sa'],
                                                     firstDay: 1,
                                                     monthNames: ['Enero','Febrero','Marzo','Abril','Mayo','Junio','Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre'],
                                                     monthNamesShort: ['Ene','Feb','Mar','Abr','May','Jun','Jul','Ago','Sep','Oct','Nov','Dic'],
                                                     dateFormat: 'dd-mm-yy',
                                                     changeMonth: true,
                                                     changeYear: true,
                                                     yearRange: "-90:+0",

                                                    });
                                            });
                                        </script>
                                        <script language="javascript">
                                            $(document).ready(function() {
                                                $(".botonExcel").click(function(event) {
                                                    $("#datos_a_enviar").val( $("<div>").append( $("#contenido").eq(0).clone()).html());
                                                    $("#FormularioExportacion").submit();
                                                });
                                            });
                                        </script>
                                        <script>
                                            function printDiv()
                                            {
                                                var divToPrint=document.getElementById('contenido');
                                                newWin= window.open('');
                                                newWin.document.write(divToPrint.outerHTML);
                                                newWin.print();
                                                newWin.close();
                                            }
                                        </script>
                                        <script>
                                            $(function() {
                                                $( "#tabs" ).tabs();
                                            });
                                        </script>
                                        <script type="text/javascript">
                                            function imprSelec()
                                            {
                                                var ficha=document.getElementById('respuesta');var ventimp=window.open(' ','popimpr');ventimp.document.write(ficha.innerHTML);ventimp.document.close();ventimp.print();ventimp.close();
                                            }
                                        </script>
                                        <script>
                                           $(document).ready(function(){
                                            $("#genREporte").click(function() {
                                                var tipo = document.getElementById("tipoI"); 
                                                if(tipo.value === "Conducta Pacientes"){
                                                    $('#reportes').attr('action', 'javascript:enviarDatos();');
                                                    $("#reportes").submit();
                                                }else if(tipo.value === "Procedencia de Pacientes"){
                                                    $('#reportes').attr('action', 'javascript:datosProce();');
                                                    $("#reportes").submit();
                                                }else if(tipo.value === "Analgesia de Pacientes"){
                                                    datosAnalg();
                                                }else if(tipo.value === "Cantidad de Partos"){
                                                    datosPartos();
                                                }else if(tipo.value === "Remisiones Ginecobstetricia"){
                                                    datosPacNa();
                                                }else if(tipo.value === "Remisiones Urgencias"){
                                                    datosPacNaU();
                                                }
                                            });
                                           });
                                        </script>
                                        <script>
                                             function enviarDatos(){     
                                                            var capass2 = $("#capass2").val();
                                                            var capass22 = $("#capass22").val();
                                                            $.ajax({
                                                                type: "POST",
                                                                url: "../../Ginecobstetricia/controlador/php/sql/indicadores.php",
                                                                data: {capass2:capass2,capass22:capass22},
                                                                success: mostrarDatos,
                                                                timeout: 4000,
                                                                error: errorEnvio


                                                            });
                                                   }


                                                    function errorEnvio() {
                                                        alert("error!...");
                                                    }

                                                    function mostrarDatos( respuesta )
                                                    {
                                                       var f1 = $("#capass2").val();
                                                       var f2 = $("#capass22").val();
                                                       $("#encabe").html("<center>Desde " + "<strong>" +f1 + "</strong>" +  " hasta " + "<strong>" + f2 + "</strong></center>" );
                                                       rpt = $.parseJSON(respuesta);
                                                       respuesta = $("#respuesta");
                                                       var total = 0;
                                                       var suma = 0;
                                                       var resp = "";
                                                       resp += ('\
                                                                 <table style="overflow:hidden;border:1px solid #d3d3d3;background:#fefefe;width:100%;margin:5% auto 0;-moz-border-radius:5px; /* FF1+ */-webkit-border-radius:5px; /* Saf3-4 */border-radius:5px;-moz-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);-webkit-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);">\
                                                                    <tr>\
                                                                        <td colspan="2" align=center style="padding:18px 28px 18px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;">\
                                                                            <strong>Conducta Pacientes</strong>\
                                                                        </td>\
                                                                    </tr>\
                                                                    <tr style="background-color:#E6E6E6">\
                                                                        <td style="padding:18px 28px 18px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;">\
                                                                            <strong>Conducta</strong>\
                                                                        </td>\
                                                                        <td style="padding:18px 28px 18px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;">\
                                                                            <strong>Cantidad</strong>\
                                                                        </td>\
                                                                    </tr>');
                                                       
                                                       for(indi in rpt){
                                                           resp += ("<tr>" + 
                                                                                "<td style='padding:18px 28px 18px; text-align:left;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>" + 
                                                                                    rpt[indi].res + 
                                                                                "</td>"+
                                                                                "<td align=center style='padding:18px 28px 18px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>" + 
                                                                                    rpt[indi].total + 
                                                                                "</td>\
                                                                             </tr>");
                                                                             suma = (suma + rpt[indi].total) ;
                                                       }
                                                       total = suma;
                                                       resp += ("<tr>\
                                                                    <td align=right style='padding:18px 28px 18px; text-align:rigth;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                                        Total Conductas:\
                                                                    </td>\
                                                                    <td align=center style='padding:18px 28px 18px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                                        <strong>"+ total +"</strong>\
                                                                    </td>\
                                                                </tr>\
                                                       </table>");
                                                       if(rpt === null){
                                                           
                                                               $("#encabe").html("");
                                                               $("#respuesta").html("<table align='center'>\n\
                                                                                        <tr>\n\
                                                                                            <td><font color=red>" + "no se encuentra ninguna informacion con las respectivas fechas" + "</font>\n\
                                                                                            </td>\n\
                                                                                         </tr>\n\
                                                                                     </table>");
                                                               $('#capass2').attr('value','');
                                                               $('#capass22').attr('value','');
                                                           }else{
                                                               $("#respuesta").html("");
                                                               respuesta.append(resp);
                                                           }

                                                     }
                                        </script>
                                        
                                        <script>
                                             function datosProce(){     
                                                            var capass2 = $("#capass2").val();
                                                            var capass22 = $("#capass22").val();
                                                            $.ajax({
                                                                type: "POST",
                                                                url: "../../Ginecobstetricia/controlador/php/sql/indicadores2.php",
                                                                data: {capass2:capass2,capass22:capass22},
                                                                success: datosPro,
                                                                timeout: 4000,
                                                                error: errorEnvio
                                                            });
                                                   }


                                                    function errorEnvio() {
                                                        alert("error!...");
                                                    }

                                                    function datosPro( respuesta )
                                                    {
                                                       var f1 = $("#capass2").val();
                                                       var f2 = $("#capass22").val();
                                                       $("#encabe").html("<center>Desde " + "<strong>" +f1 + "</strong>" +  " hasta " + "<strong>" + f2 + "</strong></center>" );
                                                       rpt2 = $.parseJSON(respuesta);
                                                       respuesta = $("#respuesta");
                                                       var total = 0;
                                                       var suma = 0;
                                                       var resp = "";
                                                       resp += ("<table style='overflow:hidden;border:1px solid #d3d3d3;background:#fefefe;width:100%;margin:5% auto 0;-moz-border-radius:5px; /* FF1+ */-webkit-border-radius:5px; /* Saf3-4 */border-radius:5px;-moz-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);-webkit-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);'>\
                                                                    <tr>\
                                                                        <td colspan='2' align=center style='padding:18px 28px 18px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                                            <strong>Procedencia Pacientes</strong>\
                                                                        </td>\
                                                                    </tr>\
                                                                    <tr>\
                                                                        <td align=center style='padding:18px 28px 18px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                                            <strong>Procedencia</strong>\
                                                                        </td>\
                                                                        <td style='padding:18px 28px 18px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                                            <strong>Cantidad</strong>\
                                                                        </td>\
                                                                    </tr>");
                                                       
                                                       for(indi2 in rpt2){
                                                           resp += ("<tr>" + 
                                                                                "<td style='padding:18px 28px 18px; text-align:left;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>" + 
                                                                                    rpt2[indi2].ate + 
                                                                                "</td>"+
                                                                                "<td align=center style='padding:18px 28px 18px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>" + 
                                                                                    rpt2[indi2].total + 
                                                                                "</td>\
                                                                             </tr>");
                                                                             suma = (suma + rpt2[indi2].total) ;
                                                       }
                                                       total = suma;
                                                       resp += ("<tr>\
                                                                    <td align=right style='padding:18px 28px 18px; text-align:rigth;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                                        Total:\
                                                                    </td>\
                                                                    <td align=center style='padding:18px 28px 18px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));''>\
                                                                        <strong>"+ total +"</strong>\
                                                                    </td>\
                                                                </tr>\
                                                       </table>");
                                                       if(rpt2 === null){
                                                           
                                                               $("#encabe").html("");
                                                               $("#respuesta").html("<table align='center'>\n\
                                                                                        <tr>\n\
                                                                                            <td><font color=red>" + "no se encuentra ninguna informacion con las respectivas fechas" + "</font>\n\
                                                                                            </td>\n\
                                                                                         </tr>\n\
                                                                                     </table>");
                                                               $('#capass2').attr('value','');
                                                               $('#capass22').attr('value','');
                                                           }else{
                                                               $("#respuesta").html("");
                                                               respuesta.append(resp);
                                                           }

                                                     }
                                        </script>
                                        
                                        <script>
                                            function limpiarF(){
                                                $('#capass2').attr('value','');
                                                $('#capass22').attr('value','');
                                                $("#encabe").html("");
                                                $("#encabe2").html("");
                                                $("#respuesta").html("");
                                                $("#respu").html("");
                                                $("#respu2").html("");
                                            }
                                        </script>
                                        
                                        <script>
                                            function datosAnalg(){     
                                                            var capass2 = $("#capass2").val();
                                                            var capass22 = $("#capass22").val();
                                                            $.ajax({
                                                                type: "POST",
                                                                url: "../../Ginecobstetricia/controlador/php/sql/indicadores3.php",
                                                                data: {capass2:capass2,capass22:capass22},
                                                                success: datosA,
                                                                timeout: 4000,
                                                                error: errorEnvio


                                                            });
                                                   }


                                                    function errorEnvio() {
                                                        alert("error!...");
                                                    }

                                                    function datosA( respuesta )
                                                    {
                                                       var f1 = $("#capass2").val();
                                                       var f2 = $("#capass22").val();
                                                       $("#encabe2").html("<center>Desde " + "<strong>" +f1 + "</strong>" +  " hasta " + "<strong>" + f2 + "</strong></center>" );
                                                       rpt3 = $.parseJSON(respuesta);
                                                       respuesta = $("#respu");
                                                       var total = 0;
                                                       var suma = 0;
                                                       var resp = "";
                                                       resp += ("<table style='overflow:hidden;border:1px solid #d3d3d3;background:#fefefe;width:100%;margin:-5% auto 0;-moz-border-radius:5px; /* FF1+ */-webkit-border-radius:5px; /* Saf3-4 */border-radius:5px;-moz-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);-webkit-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);'>\
                                                                    <tr style='background-color:#E6E6E6'>\
                                                                        <td colspan='2' align=center style='padding:18px 28px 18px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                                            <strong>Analgesia Obstetrica en Pacientes</strong>\
                                                                        </td>\
                                                                    </tr>\
                                                                    <tr style='background-color:#E6E6E6'>\
                                                                        <td align=center style='padding:18px 28px 18px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                                            <strong>Analgesia</strong>\
                                                                        </td>\
                                                                        <td style='padding:18px 28px 18px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                                            <strong>Cantidad</strong>\
                                                                        </td>\
                                                                    </tr>");
                                                       
                                                       for(indi3 in rpt3){
                                                           if(rpt3[indi3].analgesia !== null){
                                                           resp += ("<tr>" + 
                                                                                "<td style='padding:18px 28px 18px; text-align:left;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>" + 
                                                                                    rpt3[indi3].analge + 
                                                                                "</td>"+
                                                                                "<td align=center style='padding:18px 28px 18px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>" + 
                                                                                    rpt3[indi3].total + 
                                                                                "</td>\
                                                                             </tr>");
                                                                            suma = (suma + rpt3[indi3].total) ;
                                                           }
                                                       }
                                                       total = suma;
                                                       resp += ("<tr>\
                                                                    <td align=right style='padding:18px 28px 18px; text-align:right;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                                        Total:\
                                                                    </td>\
                                                                    <td align=center style='padding:18px 28px 18px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                                        <strong>"+ total +"</strong>\
                                                                    </td>\
                                                                </tr>\
                                                       </table>");
                                                       if(rpt3 === null){
                                                           
                                                               $("#encabe2").html("");
                                                               $("#respu").html("<table align='center'>\n\
                                                                                        <tr>\n\
                                                                                            <td><font color=red>" + "no se encuentra ninguna informacion con las respectivas fechas" + "</font>\n\
                                                                                            </td>\n\
                                                                                         </tr>\n\
                                                                                     </table>");
                                                               $('#capass2').attr('value','');
                                                               $('#capass22').attr('value','');
                                                           }else{
                                                               $("#respu").html("");
                                                               respuesta.append(resp);
                                                               datosCaunA();
                                                           }

                                                     }
                                        </script>
                                        
                                        <script>
                                            function datosCaunA(){     
                                                            var capass2 = $("#capass2").val();
                                                            var capass22 = $("#capass22").val();
                                                            $.ajax({
                                                                type: "POST",
                                                                url: "../../Ginecobstetricia/controlador/php/sql/indicadores4.php",
                                                                data: {capass2:capass2,capass22:capass22},
                                                                success: datosCA,
                                                                timeout: 4000,
                                                                error: errorEnvio


                                                            });
                                                   }


                                                    function errorEnvio() {
                                                        alert("error!...");
                                                    }

                                                    function datosCA( respuesta )
                                                    {
                                                       
                                                       rpt4 = $.parseJSON(respuesta);
                                                       respuesta = $("#respu2");
                                                       var total = 0;
                                                       var suma = 0;
                                                       var resp = "";
                                                       resp += ("<table style='overflow:hidden;border:1px solid #d3d3d3;background:#fefefe;width:100%;margin:5% auto 0;-moz-border-radius:5px; /* FF1+ */-webkit-border-radius:5px; /* Saf3-4 */border-radius:5px;-moz-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);-webkit-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);'>\
                                                                    <tr>\
                                                                        <td colspan='2' align=center style='padding:18px 28px 18px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                                            <strong>Causa de la no analgesia en Pacientes</strong>\
                                                                        </td>\
                                                                    </tr>\
                                                                    <tr>\
                                                                        <td align=center style='padding:18px 28px 18px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                                            <strong>Causa</strong>\
                                                                        </td>\
                                                                        <td style='padding:18px 28px 18px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                                            <strong>Cantidad</strong>\
                                                                        </td>\
                                                                    </tr>");
                                                       
                                                       for(indi4 in rpt4){
                                                           if(rpt4[indi4].analgesia !== null){
                                                           resp += ("<tr>" + 
                                                                                "<td style='padding:18px 28px 18px; text-align:left;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>" + 
                                                                                    rpt4[indi4].cna + 
                                                                                "</td>"+
                                                                                "<td align=center style='padding:18px 28px 18px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>" + 
                                                                                    rpt4[indi4].total + 
                                                                                "</td>\
                                                                             </tr>");
                                                                             suma = (suma + rpt4[indi4].total) ;
                                                           }
                                                       }
                                                       total = suma;
                                                       resp += ("<tr>\
                                                                    <td align=right style='padding:18px 28px 18px; text-align:right;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                                        Total:\
                                                                    </td>\
                                                                    <td align=center style='padding:18px 28px 18px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                                        <strong>"+ total +"</strong>\
                                                                    </td>\
                                                                </tr>\
                                                       </table>");
                                                             
                                                               $("#respu2").html("");
                                                               respuesta.append(resp);
                                                               
                                                     }
                                        </script>
                                        
                                        <script>
                                             function datosPartos(){     
                                                            var capass2 = $("#capass2").val();
                                                            var capass22 = $("#capass22").val();
                                                            $.ajax({
                                                                type: "POST",
                                                                url: "../../Ginecobstetricia/controlador/php/sql/indicadores5.php",
                                                                data: {capass2:capass2,capass22:capass22},
                                                                success: datosPar,
                                                                timeout: 4000,
                                                                error: errorEnvio


                                                            });
                                                   }


                                                    function errorEnvio() {
                                                        alert("error!...");
                                                    }

                                                    function datosPar( respuesta )
                                                    {
                                                       var f1 = $("#capass2").val();
                                                       var f2 = $("#capass22").val();
                                                       $("#encabe").html("<center>Desde " + "<strong>" +f1 + "</strong>" +  " hasta " + "<strong>" + f2 + "</strong></center>" );
                                                       rpt5 = $.parseJSON(respuesta);
                                                       respuesta = $("#respuesta");
                                                       var total = 0;
                                                       var suma = 0;
                                                       var resp = "";
                                                       resp += ("<table style='overflow:hidden;border:1px solid #d3d3d3;background:#fefefe;width:100%;margin:5% auto 0;-moz-border-radius:5px; /* FF1+ */-webkit-border-radius:5px; /* Saf3-4 */border-radius:5px;-moz-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);-webkit-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);'>\
                                                                    <tr style='background-color:#E6E6E6'>\
                                                                        <td colspan='2' align=center style='padding:18px 28px 18px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                                            <strong>Cantidad de Partos</strong>\
                                                                        </td>\
                                                                    </tr>\
                                                                    <tr style='background-color:#E6E6E6'>\
                                                                        <td align=center style='padding:18px 28px 18px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                                            <strong>Forma de Terminacion del Parto</strong>\
                                                                        </td>\
                                                                        <td style='padding:18px 28px 18px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                                            <strong>Cantidad</strong>\
                                                                        </td>\
                                                                    </tr>");
                                                       
                                                       for(indi5 in rpt5){
                                                           if(rpt5[indi5].partos !== null){
                                                           resp += ("<tr>" + 
                                                                                "<td style='padding:18px 28px 18px; text-align:left;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>" + 
                                                                                    rpt5[indi5].ate + 
                                                                                "</td>"+
                                                                                "<td align=center style='padding:18px 28px 18px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>" + 
                                                                                    rpt5[indi5].total + 
                                                                                "</td>\
                                                                             </tr>");
                                                                             suma = (suma + rpt5[indi5].total) ;
                                                            }
                                                       }
                                                       total = suma;
                                                       resp += ("<tr>\
                                                                    <td align=right style='padding:18px 28px 18px; text-align:right;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                                        Total:\
                                                                    </td>\
                                                                    <td align=center style='padding:18px 28px 18px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                                        <strong>"+ total +"</strong>\
                                                                    </td>\
                                                                </tr>\
                                                       </table>");
                                                       if(rpt5 === null){
                                                           
                                                               $("#encabe").html("");
                                                               $("#respuesta").html("<table align='center'>\n\
                                                                                        <tr>\n\
                                                                                            <td><font color=red>" + "no se encuentra ninguna informacion con las respectivas fechas" + "</font>\n\
                                                                                            </td>\n\
                                                                                         </tr>\n\
                                                                                     </table>");
                                                               $('#capass2').attr('value','');
                                                               $('#capass22').attr('value','');
                                                           }else{
                                                               $("#respuesta").html("");
                                                               respuesta.append(resp);
                                                           }

                                                     }
                                        </script>
                                        
                                        <script>
                                             function datosPacNa(){     
                                                            var capass2 = $("#capass2").val();
                                                            var capass22 = $("#capass22").val();
                                                            $.ajax({
                                                                type: "POST",
                                                                url: "../../Ginecobstetricia/controlador/php/sql/indicadores6.php",
                                                                data: {capass2:capass2,capass22:capass22},
                                                                success: datosPacn,
                                                                timeout: 4000,
                                                                error: errorEnvio


                                                            });
                                                   }


                                                    function errorEnvio() {
                                                        alert("error!...");
                                                    }

                                                    function datosPacn( respuesta )
                                                    {
                                                       var f1 = $("#capass2").val();
                                                       var f2 = $("#capass22").val();
                                                       $("#encabe").html("<center>Desde " + "<strong>" +f1 + "</strong>" +  " hasta " + "<strong>" + f2 + "</strong></center>" );
                                                       rpt6 = $.parseJSON(respuesta);
                                                       respuesta = $("#respuesta");
                                                       var total = 0;
                                                       var suma = 0;
                                                       var resp = "";
                                                       resp += ("<table style='overflow:hidden;border:1px solid #d3d3d3;background:#fefefe;width:100%;margin:5% auto 0;-moz-border-radius:5px; /* FF1+ */-webkit-border-radius:5px; /* Saf3-4 */border-radius:5px;-moz-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);-webkit-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);'>\
                                                                    <tr style='background-color:#E6E6E6'>\
                                                                        <td colspan='2' align=center style='padding:18px 28px 18px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                                            <strong>Pacientes Remitidos</strong>\
                                                                        </td>\
                                                                    </tr>\
                                                                    <tr style='background-color:#E6E6E6'>\
                                                                        <td align=center style='padding:18px 28px 18px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                                            <strong>Atencion de Pacientes</strong>\
                                                                        </td>\
                                                                        <td style='padding:18px 28px 18px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                                            <strong>Cantidad</strong>\
                                                                        </td>\
                                                                    </tr>");
                                                       
                                                       for(indi6 in rpt6){
                                                           if(rpt6[indi6].pacReci !== null){
                                                           resp += ("<tr>" + 
                                                                                "<td style='padding:18px 28px 18px; text-align:left;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>" + 
                                                                                    rpt6[indi6].pacReci + 
                                                                                "</td>"+
                                                                                "<td align=center style='padding:18px 28px 18px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>" + 
                                                                                    rpt6[indi6].cantidad + 
                                                                                "</td>\
                                                                             </tr>");
                                                                             suma = (suma + rpt6[indi6].cantidad) ;
                                                           }
                                                       }
                                                       total = suma;
                                                       resp += ("<tr>\
                                                                    <td align=right style='padding:18px 28px 18px; text-align:right;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                                        Total:\
                                                                    </td>\
                                                                    <td align=center style='padding:18px 28px 18px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                                        <strong>"+ total +"</strong>\
                                                                    </td>\
                                                                </tr>\
                                                       </table>");
                                                       if(rpt6 === null){
                                                           
                                                               $("#encabe").html("");
                                                               $("#respuesta").html("<table align='center'>\n\
                                                                                        <tr>\n\
                                                                                            <td><font color=red>" + "no se encuentra ninguna informacion con las respectivas fechas" + "</font>\n\
                                                                                            </td>\n\
                                                                                         </tr>\n\
                                                                                     </table>");
                                                               $('#capass2').attr('value','');
                                                               $('#capass22').attr('value','');
                                                           }else{
                                                               $("#respuesta").html("");
                                                               respuesta.append(resp);
                                                           }

                                                     }
                                        </script>
                                        
                                         <script>
                                             function datosPacNaU(){     
                                                            var capass2 = $("#capass2").val();
                                                            var capass22 = $("#capass22").val();
                                                            $.ajax({
                                                                type: "POST",
                                                                url: "../../Ginecobstetricia/controlador/php/sql/indicadores7.php",
                                                                data: {capass2:capass2,capass22:capass22},
                                                                success: datosPacnu,
                                                                timeout: 4000,
                                                                error: errorEnvio


                                                            });
                                                   }


                                                    function errorEnvio() {
                                                        alert("error!...");
                                                    }

                                                    function datosPacnu( respuesta )
                                                    {
                                                       var f1 = $("#capass2").val();
                                                       var f2 = $("#capass22").val();
                                                       $("#encabe").html("<center>Desde " + "<strong>" +f1 + "</strong>" +  " hasta " + "<strong>" + f2 + "</strong></center>" );
                                                       rpt7 = $.parseJSON(respuesta);
                                                       respuesta = $("#respuesta");
                                                       var total = 0;
                                                       var suma = 0;
                                                       var resp = "";
                                                       resp += ("<table style='overflow:hidden;border:1px solid #d3d3d3;background:#fefefe;width:100%;margin:5% auto 0;-moz-border-radius:5px; /* FF1+ */-webkit-border-radius:5px; /* Saf3-4 */border-radius:5px;-moz-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);-webkit-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);'>\
                                                                    <tr style='background-color:#E6E6E6'>\
                                                                        <td colspan='2' align=center style='padding:18px 28px 18px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                                            <strong>Pacientes Remitidos</strong>\
                                                                        </td>\
                                                                    </tr>\
                                                                    <tr style='background-color:#E6E6E6'>\
                                                                        <td align=center style='padding:18px 28px 18px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                                            <strong>Atencion de Pacientes</strong>\
                                                                        </td>\
                                                                        <td style='padding:18px 28px 18px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                                            <strong>Cantidad</strong>\
                                                                        </td>\
                                                                    </tr>");
                                                       
                                                       for(indi7 in rpt7){
                                                           if(rpt7[indi7].pacReci !== null){
                                                           resp += ("<tr>" + 
                                                                                "<td style='padding:18px 28px 18px; text-align:left;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>" + 
                                                                                    rpt7[indi7].pacReciu + 
                                                                                "</td>"+
                                                                                "<td align=center style='padding:18px 28px 18px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>" + 
                                                                                    rpt7[indi7].cantidad + 
                                                                                "</td>\
                                                                             </tr>");
                                                                             suma = (suma + rpt7[indi7].cantidad) ;
                                                           }
                                                       }
                                                       total = suma;
                                                       resp += ("<tr>\
                                                                    <td align=right style='padding:18px 28px 18px; text-align:right;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                                        Total:\
                                                                    </td>\
                                                                    <td align=center style='padding:18px 28px 18px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                                        <strong>"+ total +"</strong>\
                                                                    </td>\
                                                                </tr>\
                                                       </table>");
                                                       if(rpt7 === null){
                                                           
                                                               $("#encabe").html("");
                                                               $("#respuesta").html("<table align='center'>\n\
                                                                                        <tr>\n\
                                                                                            <td><font color=red>" + "no se encuentra ninguna informacion con las respectivas fechas" + "</font>\n\
                                                                                            </td>\n\
                                                                                         </tr>\n\
                                                                                     </table>");
                                                               $('#capass2').attr('value','');
                                                               $('#capass22').attr('value','');
                                                           }else{
                                                               $("#respuesta").html("");
                                                               respuesta.append(resp);
                                                           }

                                                     }
                                        </script>
                                        
                                        <script>
                                            $(document).ready(function(){
                                                $("#genREporte").click(function() {
                                                    if($("#tipoI").val() === "Seleccione"){
                                                        alertify.alert("Seleccione el tipo de indicador que desea consultar", function () {
                                                            $("#tipoI").focus();
                                                        });
                                                        return false;
                                                    }
                                                    if($("#capass2").val() === ""){
                                                        alertify.alert("Seleccione el tipo de indicador que desea consultar", function () {
                                                            $("#tipoI").focus();
                                                        });
                                                        return false;
                                                    }
                                                });
                                            });
                                                
                                        </script>
                                        
                                    </head>
                                    <body>
                                        <div id="tabs">
                                            <ul>
                                                <li><a href="#tabs-1">Indicadores</a></li>
                                            </ul>
                                            <div id="tabs-1">
                                                    <form id="reportes" method="post">
                                                        <table id="tabl">
                                                            <tr>
                                                                <td colspan="2">
                                                                    <strong>Indicadores</strong>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td>
                                                                    Tipo de Indicador:
                                                                </td>
                                                                <td>
                                                                    <select id="tipoI" name="cbTi" style="width: 100px;height:25px;" onchange="limpiarF();">
                                                                        <option>Seleccione</option>
                                                                        <option>Conducta Pacientes</option>
                                                                        <option>Procedencia de Pacientes</option>
                                                                        <option>Analgesia de Pacientes</option>
                                                                        <option>Cantidad de Partos</option>
                                                                        <option>Remisiones Ginecobstetricia</option>
                                                                        <option>Remisiones Urgencias</option>
                                                                    </select>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td>
                                                                    Fecha inicial:
                                                                </td>
                                                                <td>
                                                                    <input style="width: 100px;height:25px;"  name="capa1" type="text" class="reporte_termino" id="capass2" size="12"/>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td>
                                                                    Fecha final:
                                                                </td>
                                                                <td>
                                                                    <input style="width: 100px;height:25px;"  name="capa2" type="text" class="reporte_termino" id="capass22" size="12"/>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td align="center" colspan="2">
                                                                    <input id="genREporte" type="button" value="Generar" />
                                                                </td>
                                                            </tr>
                                                        </table>
                                                        <table  align="right">
                                                            <tr>
                                                                <td>
                                                                    <img style="cursor: pointer;" title="atras" src="../imagen/atras.png" width="30" height="30" alt="atras" onclick="window.history.back();"/>
                                                                </td>
                                                            </tr>
                                                        </table>
                                                        </br></br></br>
                                                        </form>
                                                        <hr id="sepa">
                                                        <table id="opci">
                                                            <tr>
                                                                <td>
                                                                    <form action="../../controlador/php/sql/excel.php" method="post" target="_blank" id="FormularioExportacion">
                                                                        <img title="generar en excel" src="../imagen/excel.png" width="30" height="30" class="botonExcel" />
                                                                        <input type="hidden" id="datos_a_enviar" name="datos_a_enviar" />
                                                                    </form>
                                                                </td>
                                                                <td  align="absbottom" >
                                                                    <a href="javascript:imprSelec()">
                                                                        <img title="imprimir" border="0" src="../imagen/imprimir.png" width="30" height="30">
                                                                    </a>

                                                                </td>
                                                            </tr>
                                                        </table>
                                                        <table align="center" id="contenido">
                                                            <tr>
                                                                <td colspan="3">
                                                                    <div id="encabe">
                                                                        
                                                                    </div>
                                                                </td>
                                                            </tr>
                                                            <tr><td colspan="3"></td></tr>
                                                            <tr>
                                                                <td valign="top">
                                                                    <div id="respuesta">

                                                                    </div>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td>
                                                                    <table align="center">
                                                                        <tr>
                                                                            <td colspan="3">
                                                                                <div id="encabe2">

                                                                                </div>
                                                                            </td>
                                                                        </tr>
                                                                        <tr><td colspan="3"></td></tr><tr><td colspan="3"></td></tr>
                                                                        <tr>
                                                                            <td width="55%" align="center">
                                                                                <div id="respu">

                                                                                </div>
                                                                            </td>
                                                                            <td width="2%">

                                                                            </td>
                                                                            <td style="width:500px" align="center">
                                                                                <div id="respu2">

                                                                                </div>
                                                                            </td>
                                                                        </tr>
                                                                    </table>
                                                                </td>
                                                            </tr>
                                                        </table>
                                                    </div>
                                                </div>
                                            </body>
                                        </html>
                                   </td>
                               </tr>
                       </table>
                    </div>
                  <center>